package busqueda;

import java.awt.Point;

import api.Interface;

public class Movernos {
	public static boolean norte(Point Pos) {
		int x = Pos.x;
		int y = Pos.y;
		
		if (x - 1 >= 0) {		
			if (!Interface.getTablero().getObs().contains(new Point(x - 1, y))) {
				return true;
			}
		}
		
		return false;
	}
	
	
	public static boolean sur(Point Pos) {
		int x = Pos.x;
		int y = Pos.y;
		
		if (x + 1 < Interface.getTablero().getM()) {			
			if (!Interface.getTablero().getObs().contains(new Point(x + 1, y))) {
				
				return true;
			}
		}		
		
		return false;
	}
	
	
	public static boolean oeste(Point Pos) {
		int x = Pos.x;
		int y = Pos.y;
		
		if (y - 1 >= 0) {
			if (!Interface.getTablero().getObs().contains(new Point(x, y - 1))) {
				
				return true;
			}
		}
		
		return false;
	}
	
	
	public static boolean este(Point Pos) {
		int x = Pos.x;
		int y = Pos.y;
		
		if (y + 1 < Interface.getTablero().getN()) {
			if (!Interface.getTablero().getObs().contains(new Point(x, y + 1))) {
				
				return true;
			}
		}
		
		return false;
	}
}